package com.zzyl.mapper;

import com.zzyl.entity.Reservation;
import com.zzyl.vo.ReservationCountVo;
import com.zzyl.vo.ReservationVo;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ReservationMapper {

    void insert(Reservation reservation);

    List<ReservationVo> selectByCondition(Integer status);


    List<ReservationCountVo> selectByCountByTime(LocalDateTime begin, LocalDateTime end);

    Integer selectBycancelled(Long userId, LocalDateTime begin, LocalDateTime end);

    void updateStatusOverDue(LocalDateTime now);

    void updateStatus(Long id);
}
